package ch04.home;

class Exercise4_15 {
	public static void main(String[] args) {
		int number = 12321;
		int tmp = number;

		int result = 0;

		while (tmp != 0) {
			// <1
			result = result*10 + tmp % 10;
			tmp /= 10;
			// 1>
		}

		if (number == result)
			System.out.println(number + " is a palindrome.");
		else
			System.out.println(number + " isn't a palindrome..");
	}
}
/*
12321 is a palindrome.
*/
/*
result tmp
0      12321
1      1232
12     123
123    12
1232   1
12321  0
*/
